import os

user = os.getenv('DB_USER')
password = os.getenv('DB_PASSWD')
uri = os.getenv('DB_URI')
name = os.getenv('DB_NAME')
# user = 'scheduling'
# password = 'scheduling'
# uri = '10.212.67.9:3306'
# name = 'scheduling'

db_uri = 'sqlite:///./foo.db'
if user is not None and password is not None and uri is not None and name is not None:
    db_uri = f'mysql+pymysql://{user}:{password}@{uri}/{name}?charset=utf8mb4'


class Config:
    db: str = db_uri
    create_all = True
    secret = 'yzyyds'
